<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .parent:hover p{
        color:red;
    }
    .parent>p:first-child{
        color:yellow;
    }
    .parent>p:last-child{
        color:blue;
    }
    .parent>p:nth-child(3){
        color: pink;
    }
    .parent>p:not(:nth-child(2)){
       background:greenyellow;
    }

    </style>
</head>
<body>
    <!-- 
        1.class
        2.id
        3.后代选择器
        4.兄弟选择器
        5.后代 :first-child   :last-child
     -->
     <div class="parent">
         <p>hello worldd</p>
         <p>hello worldd</p>
         <p>hello worldd</p>
         <p>hello worldd</p>
         <p>hello worldd</p>
     </div>
    
</body>
</html>